import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import { timeAgo } from './utils/date'
// 从vant组件库按需导入navabar导航栏 引入表单组件, 在main.js中全局注册
import {
  Cell, Tab, Tabs, Icon, NavBar, Form, Toast, ActionSheet,
  Field, Button, Tabbar, TabbarItem, List, PullRefresh, Dialog
} from 'vant'
import './directive'
// 引入移动适配模块
import 'amfe-flexible'
Vue.prototype.$timeAgo = timeAgo
// 全局注册Vant
Vue.use(Dialog)
Vue.use(ActionSheet)
Vue.use(Toast)
Vue.use(PullRefresh)
Vue.use(List)
Vue.use(Cell)
Vue.use(NavBar)
Vue.use(Form)
Vue.use(Field)
Vue.use(Button)
Vue.use(Tabbar)
Vue.use(TabbarItem)
Vue.use(Icon)
Vue.use(Tab)
Vue.use(Tabs)
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
